package sv.gob.mh.dgii.model;

// Generated Dec 12, 2007 1:25:05 PM by Hibernate Tools 3.2.0.CR1

import java.util.Date;
import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * DcInfDocivaExis generated by hbm2java
 */
@Entity
@Table(name = "DC_INF_DOCIVA_EXIS", schema = "EDADEPUDOC")
public class DcInfDocivaExis implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -5924673739475297266L;
	private DcInfDocivaExisId id;
	private EdDeclaraciones edDeclaraciones;
	private ImTipoDocum imTipoDocum;
	private Long ncomprobanteCred;
	private Long ninicial;
	private Long nfinal;
	private String cusuario;
	private Date fhingreso;

	public DcInfDocivaExis() {
	}

	public DcInfDocivaExis(DcInfDocivaExisId id,
			EdDeclaraciones edDeclaraciones, ImTipoDocum imTipoDocum,
			Long ncomprobanteCred, Long ninicial, Long nfinal, String cusuario,
			Date fhingreso) {
		this.id = id;
		this.edDeclaraciones = edDeclaraciones;
		this.imTipoDocum = imTipoDocum;
		this.ncomprobanteCred = ncomprobanteCred;
		this.ninicial = ninicial;
		this.nfinal = nfinal;
		this.cusuario = cusuario;
		this.fhingreso = fhingreso;
	}

	@EmbeddedId
	@AttributeOverrides( {
			@AttributeOverride(name = "iindice", column = @Column(name = "I_INDICE", nullable = false, precision = 18, scale = 0)),
			@AttributeOverride(name = "ncorrelativo", column = @Column(name = "N_CORRELATIVO", nullable = false, precision = 5, scale = 0)) })
	public DcInfDocivaExisId getId() {
		return this.id;
	}

	public void setId(DcInfDocivaExisId id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "I_INDICE", nullable = false, insertable = false, updatable = false)
	public EdDeclaraciones getEdDeclaraciones() {
		return this.edDeclaraciones;
	}

	public void setEdDeclaraciones(EdDeclaraciones edDeclaraciones) {
		this.edDeclaraciones = edDeclaraciones;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "C_TIPO_DOCUMENTO", nullable = false)
	public ImTipoDocum getImTipoDocum() {
		return this.imTipoDocum;
	}

	public void setImTipoDocum(ImTipoDocum imTipoDocum) {
		this.imTipoDocum = imTipoDocum;
	}

	@Column(name = "N_COMPROBANTE_CRED", nullable = false, precision = 10, scale = 0)
	public Long getNcomprobanteCred() {
		return this.ncomprobanteCred;
	}

	public void setNcomprobanteCred(Long ncomprobanteCred) {
		this.ncomprobanteCred = ncomprobanteCred;
	}

	@Column(name = "N_INICIAL", nullable = false, precision = 10, scale = 0)
	public Long getNinicial() {
		return this.ninicial;
	}

	public void setNinicial(Long ninicial) {
		this.ninicial = ninicial;
	}

	@Column(name = "N_FINAL", nullable = false, precision = 10, scale = 0)
	public Long getNfinal() {
		return this.nfinal;
	}

	public void setNfinal(Long nfinal) {
		this.nfinal = nfinal;
	}

	@Column(name = "C_USUARIO", nullable = false, length = 30)
	public String getCusuario() {
		return this.cusuario;
	}

	public void setCusuario(String cusuario) {
		this.cusuario = cusuario;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "FH_INGRESO", nullable = false, length = 7)
	public Date getFhingreso() {
		return this.fhingreso;
	}

	public void setFhingreso(Date fhingreso) {
		this.fhingreso = fhingreso;
	}

}
